Receive Mock Funds
This operation simulates receiving funds through PIX payment to fill your Avenia balance with any currency.
Quote
Endpoint
GET /v2/account/quote/fixed-rate
Parameters
| Field | Value | Type | Description |
|---|---|---|---|
inputCurrency | BRL | string | The currency you are paying with |
inputPaymentMethod | PIX | string | The payment method you are using |
outputCurrency | BRLA | string | The currency you want to receive |
outputPaymentMethod | INTERNAL | string | The method you want to receive funds |
inputAmount | 1000 | decimal.Decimal | The amount you want to pay/deposit. Required if outputAmount is not provided. |
outputAmount | - | decimal.Decimal | The amount you want to receive. Required if inputAmount is not provided. |
inputThirdParty | false | bool | Specifies whether the input is coming from a third party. true or false. |
outputThirdParty | false | bool | Specifies whether the output is going to a third party. true or false. |
blockchainSendMethod | PERMIT | string | Defines the blockchain transaction type. Can be TRANSFER or PERMIT. Required for blockchain inputs. |
Example
curl -X GET "https://api.sandbox.avenia.io:10952/v2/account/quote/fixed-rate?inputCurrency=BRL&inputPaymentMethod=PIX&inputAmount=1000&outputCurrency=BRLA&outputPaymentMethod=INTERNAL&inputThirdParty=false&outputThirdParty=false&blockchainSendMethod=PERMIT"
The outputCurrency and outputPaymentMethod can be any valid combination. See Supported Assets Table for valid options.
In sandbox, the PIX deposit is auto-paid by a simulated payer (no real transfer required), so the ticket completes on its own within a few seconds. This auto-payment only triggers for amounts up to R$1,000. If you create a ticket above this limit, it will stay in the created state and you will only receive the TICKET-CREATED webhook — no deposit and no TICKET-COMPLETE. Keep inputAmount at 1000 or below when testing. This cap applies to sandbox only; there is no such limit in production.
Ticket
To complete the operation, create a ticket with the quoteToken from the quote response:
{
"quoteToken": "eyJhdXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"ticketBlockchainOutput": {
"beneficiaryWalletId": "00000000-0000-0000-0000-000000000000"
}
}
The nil UUID (00000000-0000-0000-0000-000000000000) represents the current operating account. The operating account is resolved at quote time based on the subAccountId parameter.
To execute this operation on behalf of a sub-account, you must pass ?subAccountId={uuid} (using the same UUID) in every request for that ticket — the quote, the ticket creation, and any later GET:
GET /v2/account/quote/fixed-rate?subAccountId={uuid} ← required here
POST /v2/account/tickets/?subAccountId={uuid} ← and here (same UUID)
GET /v2/account/tickets/{ticketId}?subAccountId={uuid} ← and here too
Omitting subAccountId from the quote causes the operation to resolve to the main account — passing it only in the ticket has no effect. Likewise, a GET on a sub-account's ticket without subAccountId resolves to the main account and returns 404 Not Found, because the ticket belongs to the sub-account.
For different outputCurrency and outputPaymentMethod combinations, additional ticket parameters may be required. See Operations Combinations for details.